package com.kede.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 运输单
 * @TableName t_transport
 */
@TableName(value ="t_transport")
@Data
public class TransportDomain implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 联系人电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 联系人
     */
    @TableField(value = "people")
    private String people;

    /**
     * 始发地
     */
    @TableField(value = "start_location")
    private String startLocation;

    /**
     * 目的地
     */
    @TableField(value = "end_location")
    private String endLocation;

    /**
     * 当前位置
     */
    @TableField(value = "cur_location")
    private String curLocation;

    /**
     * 车牌号
     */
    @TableField(value = "car_no")
    private String carNo;

    /**
     * 发车时间
     */
    @TableField(value = "start_time")
    private LocalDateTime startTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 众多包裹编号,分割
     */
    @TableField(value = "packages")
    private String packages;

    /**
     * 司机的openid
     */
    @TableField(value = "openid")
    private String openid;

    /**
     * 备注信息
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 1 正常 2运输中 3已结算
     */
    @TableField(value = "status")
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TransportDomain other = (TransportDomain) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getPeople() == null ? other.getPeople() == null : this.getPeople().equals(other.getPeople()))
            && (this.getStartLocation() == null ? other.getStartLocation() == null : this.getStartLocation().equals(other.getStartLocation()))
            && (this.getEndLocation() == null ? other.getEndLocation() == null : this.getEndLocation().equals(other.getEndLocation()))
            && (this.getCurLocation() == null ? other.getCurLocation() == null : this.getCurLocation().equals(other.getCurLocation()))
            && (this.getCarNo() == null ? other.getCarNo() == null : this.getCarNo().equals(other.getCarNo()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getPackages() == null ? other.getPackages() == null : this.getPackages().equals(other.getPackages()))
            && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getPeople() == null) ? 0 : getPeople().hashCode());
        result = prime * result + ((getStartLocation() == null) ? 0 : getStartLocation().hashCode());
        result = prime * result + ((getEndLocation() == null) ? 0 : getEndLocation().hashCode());
        result = prime * result + ((getCurLocation() == null) ? 0 : getCurLocation().hashCode());
        result = prime * result + ((getCarNo() == null) ? 0 : getCarNo().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getPackages() == null) ? 0 : getPackages().hashCode());
        result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", phone=").append(phone);
        sb.append(", people=").append(people);
        sb.append(", startLocation=").append(startLocation);
        sb.append(", endLocation=").append(endLocation);
        sb.append(", curLocation=").append(curLocation);
        sb.append(", carNo=").append(carNo);
        sb.append(", startTime=").append(startTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", packages=").append(packages);
        sb.append(", openid=").append(openid);
        sb.append(", remark=").append(remark);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}